/*
 * #%L
 * java model
 * %%
 * Copyright (C) 2009 - 2011 prefabware.com Stefan Isele
 * %%
 * All Rights Reserved.
 * This program is dual-licensed under the GNU General Public license
 * or a commercial license.
 * You may select to use one or the other of these licenses.
 * To obtain a commercial license please contact Stefan Isele at www.stefan-isele.de
 * Any modifications to this file must keep this entire header intact.
 * Redistribution, except as permitted by the selected license, is prohibited.
 * #L%
 */
package com.prefabware.jmodel.sample;

public class HashCodeAndEquals {
private byte byte_;
private short short_;
private int int_;
private long long_;
private float float_;
private double double_;
private char char_;
private boolean boolean_;
@Override
public int hashCode() {
	final int prime = 31;
	int result = 1;
	result = prime * result + int_;
	result = prime * result + byte_;
	result = prime * result + char_;
	result = prime * result + short_;
	result = prime * result + (boolean_ ? 1231 : 1237);
	long temp;
	temp = Double.doubleToLongBits(double_);
	result = prime * result + (int) (temp ^ (temp >>> 32));
	result = prime * result + Float.floatToIntBits(float_);
	result = prime * result + (int) (long_ ^ (long_ >>> 32));
	return result;
}
@Override
public boolean equals(Object obj) {
	if (this == obj)
		return true;
	if (obj == null)
		return false;
	if (getClass() != obj.getClass())
		return false;
	HashCodeAndEquals other = (HashCodeAndEquals) obj;
	if (boolean_ != other.boolean_)
		return false;
	if (byte_ != other.byte_)
		return false;
	if (char_ != other.char_)
		return false;
	if (Double.doubleToLongBits(double_) != Double
			.doubleToLongBits(other.double_))
		return false;
	if (Float.floatToIntBits(float_) != Float.floatToIntBits(other.float_))
		return false;
	if (int_ != other.int_)
		return false;
	if (long_ != other.long_)
		return false;
	if (short_ != other.short_)
		return false;
	return true;
}
}
